<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>用户注册界面</title>

</head>
<body>
<div id="app">
<h2>注册</h2>
<form @submit.prevent="handler">
用户名 : <input type="text" v-model="myform.username"><br>
密   码 : <input type="password" v-model="myform.password"><br>
确认密码:<input type="password" v-model="myform.beginPassword"><br>
性别:<input type="radio" v-model="myform.sex" value="0" checked>男
     <input type="radio" v-model="myform.sex" value="1">女<br>
爱好：<input type="checkbox" v-model="myform.like" value="read">读书
     <input type="checkbox" v-model="myform.like" value="sport">体育
     <input type="checkbox" v-model="myform.like" value="trip">旅游<br>
国籍 ： <select v-model="myform.country">
        <option >中国</option>
        <option >美国</option>
        <option >英国</option>
        </select><br>
个人简介:<textarea v-model="myform.brief" rows="=3" cols="9">请输入个人简介</textarea><br>
<button type="submit">提交</button>
</form>
</div>
<script src="vue.global.js"></script>
<script>
const app=Vue.createApp({
    data(){
     return {
         myform:{
             username:'',
             password:'',
             beginPassword:'',
             sex:'',
             like:[1,1,2],
             country:0,
             brief:'',
         }
     }
    },
 methods:{
   handler(){
       console.log(this.myform.username);
       console.log(this.myform.password);
       console.log(this.myform.beginPassword);
       console.log(this.myform.sex);
       console.log(this.myform.like);
       console.log(this.myform.country);
       console.log(this.myform.brief);
   }
    },
mounted() {}
});

app.mount('#app');
</script>

</body>
</html>
